package mc.support.taobao.api;

import mc.support.taobao.api.fields.GetBrandInfoFields;
import com.taobao.api.TaobaoRequest;
import com.taobao.api.request.ItempropsGetRequest;
import com.taobao.api.response.ItempropsGetResponse;

/**
 * @Author:kane
 * @Date:2014年3月18日
 * 
 */
public class GetBrandInfoReq extends
		AbstractReq<GetBrandInfoReq, ItempropsGetResponse> {

	private long cid;

	private GetBrandInfoFields fields;

	public GetBrandInfoReq fields(GetBrandInfoFields fields) {
		this.fields = fields;
		return this;
	}

	// public GetBrandInfoReq() {
	// this.fields = new GetBrandInfoFields().multi().must().name().pid()
	// .prop_values();
	// }

	@Override
	protected TaobaoRequest toRequest() {
		ItempropsGetRequest req = new ItempropsGetRequest();
		if (null != fields) {
			req.setFields(fields.toString());
		}

		if (0 != cid) {
			req.setCid(cid);
		}
		return req;
	}

	public void setCid(long cid) {
		this.cid = cid;
	}


}
